|
2020-2021 Sunseeker Telemetry and Lighting System
|
Go to the source code of this file.
Macros | |
| #define | TIMER_PERIOD 80 |
Functions | |
| void | main (void) |
| void | ADC_ISR (void) |
| void | TA0_ISR (void) |
| #define TIMER_PERIOD 80 |
ADC - Sample A7 input, 1.5V Shared Ref, LED ON if A7 > 0.5V
MSP430FR4133 Demo A single sample is made on A7 with reference to internal 1.5V Vref.Software sets ADCSC to start sample and conversion - ADCSC automatically cleared at EOC. ADC internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC conversion complete, ADC_ISR will force exit from LPM0 in Mainloop on reti. If A7 > 0.5V, P1.0 set, else reset.
MSP430FR2xx_4xx Board
-----------------
/|\| XIN|-
| | |
--|RST XOUT|-
| A7|<-- Sample Signal
| |-->LED1
| |-->LED2
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 70 of file adc_ex2_intRef.c.
| void ADC_ISR | ( | void | ) |
Definition at line 203 of file adc_ex2_intRef.c.
References __bic_SR_register_on_exit(), GPIO_setOutputHighOnPin(), and GPIO_setOutputLowOnPin().
| void main | ( | void | ) |
Definition at line 72 of file adc_ex2_intRef.c.
References __delay_cycles(), __no_operation(), initUpModeParam, and TIMER_PERIOD.
| void TA0_ISR | ( | void | ) |
Definition at line 270 of file adc_ex2_intRef.c.